//#include<iostream>
//using namespace std;
//int main(){
//	int a1,a2,h1,h2;
//	cin>>a1>>a2>>h1>>h2;
//	//attention the horse 
//	int horse[][]={{h1+2,h2+1},{h1-2,h2+1},{h1+1,h2+2},{h1-1,h2+2},{h1+2,h2-1},{h1-2,h2-1},{h1+1,h2-2},{h1-1,h2-2},{h1,h2}};
//	for(int i=0;i<=a1;i++){
//		for(int j=0;j<=0;i++){
//			if(a1){
//				//TODO
//			}
//		}
//	} 
//	
//	return 0 ;
//}
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;

const int fx[] = {0,-2,-1,1,2,2,1,-1,-2};
const int fy[] = {0,1,2,2,1,-1,-2,-2,-1};
//attention the horse

int bx,by,mx,my;
ll f[40][40];
bool s[40][40];
int main(){
	scanf("%d%d%d%d",&bx,&by,&mx,&my);
	bx+=2;by+=2;mx+=2;my+=2;
	//attention the line
	f[2][1] =1;//start up
	s[mx][my]=1;
	for(int i=1;i<=8;i++){
		s[mx+fx[i]][my+fy[i]]=1;
		}
	for(int i=2;i<=bx;i++){
		for(int j=2;j<=by;j++)
		{
			if (s[i][j])continue;
			f[i][j] = f[i-1][j]+f[i][j-1];
			//function of the attitude transformation
			
		}
	}
	printf("%lld\n",f[bx][by]);
	return 0;
	
}
